As an example of a semiconductor device, a semiconductor device in which a test circuit performing a diagnosis or others is previously embedded is cited. As an example of the test circuit, a scan path or others is cited, the scan path supplying a test pattern as an input to a circuit block in the semiconductor device such as a circuit block in accordance with a user, and outputting an output from the circuit block. A semiconductor device supplier (hereinafter, also referred to as a semiconductor manufacturer) that provides a user with a semiconductor device and/or the user can detect whether a failure has occurred in a semiconductor device or not by using a test circuit such as a scan path. For example, the semiconductor manufacturer can detect a failure in a semiconductor device during a test process by using a test circuit before providing the semiconductor device. And, for example, when configuring an electronic device by using a provided semiconductor device, the user can detect a failure in the semiconductor device by using a test circuit embedded in the semiconductor device. This test circuit such as a scan path detects a failure that has occurred in a semiconductor device. That is, the test circuit detects a failure after the failure occurs. Therefore, when it is not easy to replace a semiconductor device or an electronic device using the semiconductor device, even if the failure of the semiconductor device is detected, the semiconductor device or the electronic device cannot be used for a long time. In addition, in a semiconductor device used in a public infrastructure or others, even if a period of time from the detection of the failure to the replacement is short, this is a large impact. A technique relating to a failure in a semiconductor device is described in, for example, Japanese Patent Application Laid-open Publication No. 2014-235060 (Patent Document 1).